package com.xbongbong.paas.model;

import com.xbongbong.paas.domain.entity.StageWorkflowEntity;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.IModel;

import java.util.List;
import java.util.Map;

/**
 *  阶段工作流关联
 * @author 李少杰
 * @date 2021/11/17 19:52
 * @version v1.0.0
 */
public interface StageWorkflowModel extends IModel<StageWorkflowEntity> {

    /**
     * 插入
     * @param entity 实体
     * @return
     * @throws XbbException
     */
    @Override
    Integer insert(StageWorkflowEntity entity) throws XbbException;

    /**
     * 更新
     * @param entity 实体
     * @return
     * @throws XbbException
     */
    @Override
    Integer update(StageWorkflowEntity entity) throws XbbException;

    /**
     * 条件查找
     * @param param 查询条件
     * @return
     */
    @Override
    List<StageWorkflowEntity> findEntitys(Map<String, Object> param);

    /**
     * 主键查找
     * @param key
     * @param corpid
     * @return
     */
    StageWorkflowEntity getByKey(Long key, String corpid);

    /**
     * 保存
     * @param paasStageEntity
     * @return
     * @throws XbbException
     */
    Integer save(StageWorkflowEntity paasStageEntity) throws XbbException;

    /**
     * 删除
     * @param entity
     * @return
     */
    Integer delete(StageWorkflowEntity entity);

    /**
     * 批量插入
     * @param list
     */
    void insertBatch(List<StageWorkflowEntity> list);

    /**
     * 批量更新
     * @param stageWorkflowEntityList
     * @param corpid
     */
    void updateBatch(List<StageWorkflowEntity> stageWorkflowEntityList, String corpid);

    /**
     * 批量删除
     * @param stageWorkflowEntityList
     * @param corpid
     * @return
     */
    Integer deleteBatch(List<StageWorkflowEntity> stageWorkflowEntityList, String corpid);

}
